/*
 * @Date: 2023-04-30 10:17:02
 * @LastEditTime: 2023-06-23 16:18:32

 * 介绍:
 */
import CrequestList from "./CrequestList.vue";
import type { Api, GetApiData, GetApiRes } from "@@/hooks/useRequestList";

type Instance = GenericComponentExports<typeof CrequestList>;

export type CrequestListRef<F extends Api> = Omit<Instance, "data" | "res"> & {
  data: GetApiData<F>;
  res: GetApiRes<F> | undefined;
};

export function useCrequestListRef<F extends Api>() {
  return ref<CrequestListRef<F>>();
}

export function useCrequestListRefs<F extends Api>() {
  return ref<CrequestListRef<F>[]>([]);
}
